package com.gz.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.gz.common.*;
import com.gz.common.model.*;
import com.gz.utils.JSONUtil;
import com.gz.utils.Response;
import com.gz.utils.StringUtil;
import com.gz.utils.TimeUtil;
import com.jfinal.core.Controller;
import com.jfinal.plugin.activerecord.Page;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by gongzhen on 2018/6/2.
 */
public class MessageController extends Controller{

    public void getMessagePage(){
        int pageNum=getParaToInt("pageNum",1);
        int pageSize=getParaToInt("pageSize",10);
        Page<Message> messagePage= MessageService.getService().getMessagePage(pageNum,pageSize);
        renderJson(Response.responseJson(200,"成功",messagePage));
    }
}
